<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>stty</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_2125">&nbsp;</a>NAME</h4><blockquote>
stty - set the options for a terminal
</blockquote><h4><a name = "tag_001_014_2126">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

stty <b>[</b> -a| -g<b>]</b>

stty <i>operands</i>
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_2127">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>stty</i>
utility sets or reports on terminal
I/O
characteristics for the device that is its standard input.
Without options or operands specified,
it reports the settings of certain characteristics,
usually those that differ from implementation-dependent defaults.
Otherwise, it modifies the terminal state according to the
specified operands.
Detailed information about the modes listed in the first five groups below
are described in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .
Operands in the Combination Modes group
(see
<xref href=sttycomb><a href="#tag_001_014_2129_006">
Combination Modes
</a></xref>)
are implemented using operands in the previous groups.
Some combinations of operands are mutually exclusive on some
terminal types; the results of using such combinations are unspecified.
<p>
Typical implementations of this utility require a communications line
configured to use a <b>XSH</b> specification <b>termios</b> interface.
On systems where none of these lines are available, and on lines
not currently configured to support the <b>XSH</b> specification termios
interface, some of the operands need not affect terminal characteristics.
</blockquote><h4><a name = "tag_001_014_2128">&nbsp;</a>OPTIONS</h4><blockquote>
The
<i>stty</i>
utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .
<p>
The following options are supported:
<dl compact>

<dt><b>-a</b>
<dd>Write to standard output all the current settings for the terminal.

<dt><b>-g</b>
<dd>Write to standard output all the
current settings in an unspecified form that can be used as arguments
to another invocation of the
<i>stty</i>
utility on the same system.
The form used will not contain
any characters that would require
quoting to avoid word expansion by the shell; see
<xref href=wordexp><a href="chap2.html#tag_001_006">
Word Expansions
</a></xref>.

</dl>
</blockquote><h4><a name = "tag_001_014_2129">&nbsp;</a>OPERANDS</h4><blockquote>
The following operands are supported
to set the terminal characteristics:
<h5><a name = "tag_001_014_2129_001">&nbsp;</a>Control Modes</h5>
<dl compact>

<dt><b>parenb (-parenb)</b><dd>
Enable (disable) parity generation and detection.
This has the effect of setting (not setting)
PARENB in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>parodd (-parodd)</b><dd>
Select odd (even) parity.
This has the effect of setting (not setting)
PARODD
in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>cs5 cs6 cs7 cs8</b><dd>
Select character size, if possible.
This has the effect of setting
CS5,
CS6,
CS7
and
CS8,
respectively, in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .


<dt><i>number</i><dd>Set terminal baud rate to the number given, if possible.
If the baud rate is set to zero, the modem control lines will no longer be
asserted.
This has the effect of setting the input and output
<b>termios</b>
baud rate values as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ispeed </b><i>number</i><dd>
Set terminal input baud rate to the number given, if possible.
If the input baud rate is set to zero, the input baud rate
will be specified by the value of the output baud rate.
This has the effect of setting the input
<b>termios</b>
baud rate values as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ospeed </b><i>number</i><dd>
Set terminal output baud rate to the number given, if possible.
If the output baud rate is set to zero,
the modem control lines will no longer be asserted.
This has the effect of setting the output
<b>termios</b>
baud rate values as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>hupcl (-hupcl)</b><dd>
Stop asserting modem control lines (do not stop asserting
modem control lines) on last close.
This has the effect of setting (not setting)
HUPCL
in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>hup (-hup)</b><dd>
Same as <b>hupcl</b> (<b>-hupcl</b>).

<dt><b>cstopb (-cstopb)</b><dd>
Use two (one) stop bits per character.
This has the effect of setting (not setting)
CSTOPB
in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>cread (-cread)</b><dd>
Enable (disable) the receiver.
This has the effect of setting (not setting)
CREAD
in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>clocal (-clocal)</b><dd>
Assume a line without (with) modem control.
This has the effect of setting (not setting)
CLOCAL
in the
<b>termios</b>
<b>c_cflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

</dl>
<p>
It is unspecified whether
<i>stty</i>
will report an error if an attempt to set a Control Mode fails.
<h5><a name = "tag_001_014_2129_002">&nbsp;</a>Input Modes</h5>
<dl compact>

<dt><b>ignbrk (-ignbrk)</b><dd>
Ignore (do not ignore) break on input.
This has the effect of setting (not setting)
IGNBRK
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>brkint (-brkint)</b><dd>
Signal (do not signal)
INTR
on break.
This has the effect of setting (not setting)
BRKINT
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ignpar (-ignpar)</b><dd>
Ignore (do not ignore) bytes with parity errors.
This has the effect of setting (not setting)
IGNPAR
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>parmrk (-parmrk)</b><dd>
Mark (do not mark) parity errors.
This has the effect of setting (not setting)
PARMRK
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .


<dt><b>inpck (-inpck)</b><dd>
Enable (disable) input parity checking.
This has the effect of setting (not setting)
INPCK
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .


<dt><b>istrip (-istrip)</b><dd>
Strip (do not strip) input characters to seven bits.
This has the effect of setting (not setting)
ISTRIP
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>inlcr (-inlcr)</b><dd>
Map (do not map)
NL
to
CR
on input.
This has the effect of setting (not setting)
INLCR
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>igncr (-igncr)</b><dd>
Ignore (do not ignore)
CR
on input.
This has the effect of setting (not setting)
IGNCR
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>icrnl (-icrnl)</b><dd>
Map (do not map)
CR
to
NL
on input.
This has the effect of setting (not setting)
ICRNL
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>iuclc (-iuclc)</b><dd>
Map (do not map)
upper-case alphabetics to lower-case on input.
This has the effect of setting (not setting)
IUCLC
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> . (<b>LEGACY</b>)

<dt><b>ixon (-ixon)</b><dd>
Enable (disable)
START/STOP
output control.
Output from the system is stopped when the system receives
STOP
and started when the system receives
START.
This has the effect of setting (not setting)
IXON
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ixany (-ixany)</b><dd>
Allow any character to restart output.
This has the effect of setting (not setting)
IXANY
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ixoff (-ixoff)</b><dd>
Request that the system send (not send)
STOP characters when the input queue is nearly full and START
characters to resume data transmission.
This has the effect of setting (not setting)
IXOFF
in the
<b>termios</b>
<b>c_iflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

</dl>
<h5><a name = "tag_001_014_2129_003">&nbsp;</a>Output Modes</h5>
<dl compact>

<dt><b>opost (-opost)</b><dd>
Post-process output (do not post-process output;
ignore all other output modes).
This has the effect of setting (not setting)
OPOST
in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>olcuc (-olcuc)</b><dd>
Map (do not map)
lower-case alphabetics to upper-case on output.
This has the effect of setting (not setting)
OLCUC
in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> . (<b>LEGACY</b>)

<dt><b>ocrnl (-ocrnl)</b><dd>
Map (do not map) CR to NL on output
This has the effect of setting (not setting)
OCRNL
in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>onocr (-onocr)</b><dd>
Do not (do) output CR at column zero.
This has the effect of setting (not setting) ONOCR in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>onlret (-onlret)</b><dd>
The terminal newline key performs (does not perform) the CR function.
This has the effect of setting (not setting) ONLRET in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ofill (-ofill)</b><dd>
Use fill characters (use timing) for delays.
This has the effect of setting (not setting)
OFILL
in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ofdel (-ofdel)</b><dd>
Fill characters are DELs (NULs).
This has the effect of setting (not setting) OFDEL in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>cr0 cr1 cr2 cr3</b><dd>
Select the style of delay for CRs.
This has the effect of setting (not setting) CRDLY to
CR1, CR2, CR3 or CR4, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>nl0 nl1</b><dd>Select the style of delay for NL.
This has the effect of setting (not setting) NLDLY to
NL0 or NL1, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>tab0 tab1 tab2 tab3</b><dd>
Select the style of delay for horizontal tabs.
This has the effect of setting (not setting) TABDLY to
TAB0, TAB1, TAB2 or TAB3, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .
Note that TAB3 has the effect of expanding tabs to spaces.

<dt><b>bs0 bs1</b><dd>Select the style of delay for backspaces.
This has the effect of setting (not setting)
BSDLY to BS0 or BS1, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>ff0 ff1</b><dd>Select the style of delay for form-feeds.
This has the effect of setting (not setting)
FFDLY to FF0 or FF1, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>vt0 vt1</b><dd>Select the style of delay for vertical-tabs.
This has the effect of setting (not setting)
VTDLY to VT0 or VT1, respectively, in the
<b>termios</b>
<i>c_oflag</i>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

</dl>
<h5><a name = "tag_001_014_2129_004">&nbsp;</a>Local Modes</h5>
<dl compact>

<dt><b>isig (-isig)</b><dd>
Enable (disable) the checking of characters against the special control
characters
INTR,
QUIT,
and
SUSP.
This has the effect of setting (not setting)
ISIG
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .


<dt><b>icanon (-icanon)</b><dd>
Enable (disable) canonical input
(ERASE
and
KILL
processing).
This has the effect of setting (not setting)
ICANON
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .


<dt><b>xcase (-xcase)</b><dd>
Set canonical (unprocessed) upper- or lower-case presentation.
This has the effect of setting (not setting)
XCASE
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> . (<b>LEGACY</b>)

<dt><b>iexten (-iexten)</b><dd>
Enable (disable) any implementation-dependent special control characters not
currently controlled by
<b>icanon</b>,
<b>isig</b>,
<b>ixon</b>
or
<b>ixoff</b>.
This has the effect of setting (not setting)
IEXTEN
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>echo (-echo)</b><dd>
Echo back (do not echo back) every character typed.
This has the effect of setting (not setting)
ECHO
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>echoe (-echoe)</b><dd>
The
ERASE
character will (will not) visually erase the last character
in the current line from the
display, if possible.
This has the effect of setting (not setting)
ECHOE
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>echok (-echok)</b><dd>
Echo (do not echo)
NL
after
KILL
character.
This has the effect of setting (not setting)
ECHOK
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>echonl (-echonl)</b><dd>
Echo (do not echo)
NL,
even if
<b>echo</b>
is disabled.
This has the effect of setting (not setting)
ECHONL
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>noflsh (-noflsh)</b><dd>
Disable (enable) flush after
INTR,
QUIT,
SUSP.
This has the effect of setting (not setting)
NOFLSH
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .

<dt><b>tostop (-tostop)</b><dd>
Send SIGTTOU for background output.
This has the effect of setting (not setting)
TOSTOP
in the
<b>termios</b>
<b>c_lflag</b>
field, as defined in the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .
<dl><dt><b>Note:</b>
<dd>Setting TOSTOP has no effect on systems not supporting
the job control option, but all XSI-conformant systems do support this option.
</dl>
<p>
</dl>
<h5><a name = "tag_001_014_2129_005">&nbsp;</a>Special Control Character Assignments</h5>
<dl compact>

<dt><i>&lt;control&gt;-character string</i><dd>
Set
<i>&lt;control&gt;-character</i>
to
<i>string</i>.
If
<i>&lt;control&gt;-character</i>
is one of the character sequences in the first column of
the following table,
the corresponding <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a>  control character
from the second column will be recognised.
This has the effect of setting the corresponding element of the
<b>termios</b>
<b>c_cc</b>
array (see the <b>XSH</b> specification
<i><a href="../xsh/termios.h.html">&lt;termios.h&gt;</a></i>).

<table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Control Character</b>
<th align=center><b>c_cc Subscript</b>
<th align=center><b>Description</b>
<tr valign=top><td align=left><b>eof</b>
<td align=left>VEOF
<td align=left>EOF character
<tr valign=top><td align=left><b>eol</b>
<td align=left>VEOL
<td align=left>EOL character
<tr valign=top><td align=left><b>erase</b>
<td align=left>VERASE
<td align=left>ERASE character
<tr valign=top><td align=left><b>intr</b>
<td align=left>VINTR
<td align=left>INTR character
<tr valign=top><td align=left><b>kill</b>
<td align=left>VKILL
<td align=left>KILL character
<tr valign=top><td align=left><b>quit</b>
<td align=left>VQUIT
<td align=left>QUIT character
<tr valign=top><td align=left><b>susp</b>
<td align=left>VSUSP
<td align=left>SUSP character
<tr valign=top><td align=left><b>start</b>
<td align=left>VSTART
<td align=left>START character
<tr valign=top><td align=left><b>stop</b>
<td align=left>VSTOP
<td align=left>STOP character
</table>
<h6 align=center><xref table="Control Character Names in <I>stty</i>"></xref>Table: Control Character Names in <i>stty</i></h6>

If
<i>string</i>
is a single character, the control character will be set to that character.
If
<i>string</i>
is the two-character sequence "^-" or the string
undef,
the control character will be set to
{_POSIX_VDISABLE},
if it is in effect for the device; if
{_POSIX_VDISABLE}
is not in effect for the device, it
will be treated as an error.
In the POSIX locale, if
<i>string</i>
is a two-character sequence
beginning with circumflex (^), and the second character is
one of those listed in the <i>^c</i>
column of
the following table,
the control character will be set to the corresponding
character value in the Value column of the table.
<pre>
<table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>^<i>c</i></b>
<th align=center><b>Value</b>
<th align=center><b>^<i>c</i></b>
<th align=center><b>Value</b>
<th align=center><b>^<i>c</i></b>
<th align=center><b>Value</b>
<tr valign=top><td align=left>a, A
<td align=left>&lt;SOH&gt;
<td align=left>l, L
<td align=left>&lt;FF&gt;
<td align=left>w, W
<td align=left>&lt;ETB&gt;
<tr valign=top><td align=left>b, B
<td align=left>&lt;STX&gt;
<td align=left>m, M
<td align=left>&lt;CR&gt;
<td align=left>x, X
<td align=left>&lt;CAN&gt;
<tr valign=top><td align=left>c, C
<td align=left>&lt;ETX&gt;
<td align=left>n, N
<td align=left>&lt;SO&gt;
<td align=left>y, Y
<td align=left>&lt;EM&gt;
<tr valign=top><td align=left>d, D
<td align=left>&lt;EOT&gt;
<td align=left>o, O
<td align=left>&lt;SI&gt;
<td align=left>z, Z
<td align=left>&lt;SUB&gt;
<tr valign=top><td align=left>e, E
<td align=left>&lt;ENQ&gt;
<td align=left>p, P
<td align=left>&lt;DLE&gt;
<td align=left>[
<td align=left>&lt;ESC&gt;
<tr valign=top><td align=left>f, F
<td align=left>&lt;ACK&gt;
<td align=left>q, Q
<td align=left>&lt;DC1&gt;
<td align=left>\
<td align=left>&lt;FS&gt;
<tr valign=top><td align=left>g, G
<td align=left>&lt;BEL&gt;
<td align=left>r, R
<td align=left>&lt;DC2&gt;
<td align=left>]
<td align=left>&lt;GS&gt;
<tr valign=top><td align=left>h, H
<td align=left>&lt;BS&gt;
<td align=left>s, S
<td align=left>&lt;DC3&gt;
<td align=left>^
<td align=left>&lt;RS&gt;
<tr valign=top><td align=left>i, I
<td align=left>&lt;HT&gt;
<td align=left>t, T
<td align=left>&lt;DC4&gt;
<td align=left>_
<td align=left>&lt;US&gt;
<tr valign=top><td align=left>j, J
<td align=left>&lt;LF&gt;
<td align=left>u, U
<td align=left>&lt;NAK&gt;
<td align=left>?
<td align=left>&lt;DEL&gt;
<tr valign=top><td align=left>k, K
<td align=left>&lt;VT&gt;
<td align=left>v, V
<td align=left>&lt;SYN&gt;
<td align=left>&nbsp;
<td align=left>&nbsp;
</table>
</pre>
<h6 align=center><xref table="Circumflex Control Characters in <I>stty</i>"></xref>Table: Circumflex Control Characters in <i>stty</i></h6>


<dt><b>min </b><i>number</i><dd>
<dt><b>time </b><i>number</i><dd>
Set the value of
<b>min</b>
or
<b>time</b>
to <i>number</i>.
MIN and TIME are used in non-canonical mode input processing
(<b>-icanon</b>).

</dl>
<h5><a name = "tag_001_014_2129_006">&nbsp;</a>Combination Modes</h5>
<xref type="5" name="sttycomb"></xref>
<dl compact>

<dt><i>saved settings</i><dd>
Set the current terminal characteristics to the saved
settings produced by the
<b>-g</b>
option.

<dt><b>evenp</b> or <b>parity</b><dd>
Enable <b>parenb</b> and <b>cs7</b>;
disable
<b>parodd</b>.

<dt><b>oddp</b><dd>Enable <b>parenb</b>, <b>cs7</b> and <b>parodd</b>.

<dt><b>-parity</b>, <b>-evenp</b> or <b>-oddp</b><dd>
Disable <b>parenb</b>, and set
<b>cs8</b>.

<dt><b>raw</b>&nbsp;(<b>-raw</b>&nbsp;or&nbsp;<b>cooked</b>)<dd>
Enable (disable) raw input and output.
Raw mode is equivalent to setting:
<pre>
<code>
stty cs8 erase ^- kill ^- intr ^- \
    quit ^- eof ^- eol ^- -opost -inpck
</code>
</pre>

<dt><b>nl (-nl)</b><dd>Enable (disable) <b>icrnl</b>.
In addition, <b>-nl</b> unsets
<b>inlcr</b> and <b>igncr</b>.

<dt><b>lcase (-lcase)</b><dd>
Set (unset)
<b>xcase</b>,
<b>iuclc</b>
and
<b>olcuc</b>.
(<b>LEGACY</b>)

<dt><b>LCASE (-LCASE)</b><dd>
Equivalent to
lcase (-lcase).
(<b>LEGACY</b>)

<dt><b>tabs</b>&nbsp;(<b>-tabs</b>&nbsp;or&nbsp;<b>tab3</b>)<dd>
Preserve tabs (expand to spaces) when printing.

<dt><b>ek</b><dd>Reset
ERASE
and
KILL
characters back to system defaults.

<dt><b>sane</b><dd>Reset all modes to some reasonable, unspecified, values.

</dl>
</blockquote><h4><a name = "tag_001_014_2130">&nbsp;</a>STDIN</h4><blockquote>
Although no input is read from standard input, standard input is
used to get the current terminal I/O characteristics and to set
new terminal I/O characteristics.
</blockquote><h4><a name = "tag_001_014_2131">&nbsp;</a>INPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_2132">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>stty</i>:
<dl compact>

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_CTYPE</i><dd>
This variable will determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single-
versus multi-byte characters in arguments)
and which characters are in the class
<b>print</b>.

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
</dl>
</blockquote><h4><a name = "tag_001_014_2133">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_2134">&nbsp;</a>STDOUT</h4><blockquote>
If operands are specified, no output is produced.
<p>
If the
<b>-g</b>
option is specified,
<i>stty</i>
will write to standard output the
current settings in a form that can be used as arguments to
another instance of
<i>stty</i>
on the same system.
<p>
If the
<b>-a</b>
option is specified, all of the information as described in
the OPERANDS section will be written to standard output.
Unless otherwise
specified, this information is written as
space-separated
tokens in an unspecified format, on one or more lines, with an
unspecified number of tokens per line.
Additional information may be written.
<p>
If no options or operands are specified, an unspecified
subset of the information written for the
<b>-a</b>
option is written.
<p>
If speed information is written as part
of the default output, or if the
<b>-a</b>
option is specified and
if the terminal input speed and output speed are the same,
the speed information will be written as follows:
<p><code>
<pre>
<tt>"speed %d baud;"</tt>, &lt;<i>speed</i>&gt;
</pre>
</code>
<p>
Otherwise, speeds will be written as:
<p><code>
<pre>
<tt>"ispeed %d baud; ospeed %d baud;"</tt>, &lt;<i>ispeed</i>&gt;,
&lt;<i>ospeed</i>&gt;
</pre>
</code>
<p>
In locales other than the POSIX locale, the word
<b>baud</b>
may be changed to something more appropriate in those locales.
<p>
If control characters are written
as part of the default output, or if the
<b>-a</b>
option is specified,
control characters will be written as:
<p><code>
<pre>
<tt>"%s = %s;"</tt>, &lt;<i>&lt;control&gt;-character name</i>&gt;,
&lt;<i>value</i>&gt;
</pre>
</code>
where <i>value</i> is either the character, or some visual representation
of the character if it is non-printable, or the string
&lt;undef&gt;
if the character is disabled.
</blockquote><h4><a name = "tag_001_014_2135">&nbsp;</a>STDERR</h4><blockquote>
Used only for diagnostic messages.
</blockquote><h4><a name = "tag_001_014_2136">&nbsp;</a>OUTPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_2137">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_2138">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>The terminal options were read or set successfully.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_2139">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_2140">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
The
<b>-g</b>
flag is designed to
facilitate the saving and restoring of terminal state from
the shell level.
For example, a program may:
<pre>
<code>
saveterm="$(stty -g)"       # save terminal state
stty <i>(new settings)</i>         # set new state
...                             # ...
stty $saveterm              # restore terminal state
</code>
</pre>
<p>
Since the format is unspecified, the saved value is not portable
across systems.
<p>
Since the
<b>-a</b>
format is so loosely specified,
scripts that save and restore terminal settings should use the
<b>-g</b>
option.
</blockquote><h4><a name = "tag_001_014_2141">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_2142">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns about
parts of this interface definition to the IEEE PASC Shell and Utilities Working Group
which is identifying the corrections.
A future revision of this specification will align with
IEEE Std. 1003.2b when finalised.
</blockquote><h4><a name = "tag_001_014_2143">&nbsp;</a>SEE ALSO</h4><blockquote>
The <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b>&nbsp;</a> .
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
